$(function () {
    findByItem(1)
})
function findByItem(pageNO) {
    $.post("/note/findByItem",$("#formId").serialize()+"&pageNO="+pageNO,function (pageInfo) {
        var str="";
        for (var i=0;i<pageInfo.list.length;i++) {
            var obj=pageInfo.list[i]
            str+=`<tr><td>${obj.noteDate}</td><td>${obj.noteInfo}</td></tr>`
        }
        $("#tbodyId").html(str)

        if(pageNO==1){
            layui.use('laypage', function () {
                var laypage = layui.laypage;
                laypage.render({
                    elem: "cutPageDiv"
                    , count: pageInfo.total,
                    limit: 4,
                    jump: function (obj, first) {
                        /*打印页码*/
                        if (first != 1) {
                            findByItem(obj.curr);
                        }
                    }
                })
            })


        }


    })
}